﻿$(function () {
    $("#searchBT").button();
	$("#deleteAllBT").button({
		icons: {
			primary: "ui-icon-trash"
		}
	});
	$("#activeAllBT").button({
		icons: {
			primary: "ui-icon-check"
		}
	});
	$("#topAllBT").button({
		icons: {
			primary: "ui-icon-flag"
		}
	});
	$("#addBT").button({
		icons: {
			primary: "ui-icon-circle-plus"
		}
    });

    $(".innerBtn").hover(
                    function () {
                        $(this).addClass("ui-state-hover");
                    },
                    function () {
                        $(this).removeClass("ui-state-hover");
                    }
                );

    $(".data_grid tbody tr").hover(
                    function () {
                        $(this).addClass("tr-state-hover");
                    },
                    function () {
                        $(this).removeClass("tr-state-hover");
                    }
                );

    $("#checkAll").click(function () {
        var chxs = $("td :checkbox");
        if ($(this).is(":checked")) {
            chxs.attr("checked", true);
        }
        else {
            chxs.attr("checked", false);
        }
    });
});